package com.tsa.day06.rddishello.controller;

import com.tsa.day06.rddishello.entity.Product;
import com.tsa.day06.rddishello.service.ProductService;
import com.tsa.day06.rddishello.vo.R;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;

/**
 * (Product)表控制层
 *
 * @author tsajava
 * @since 2025-10-20 16:47:40
 */
@RestController
@RequestMapping("product")
public class ProductController {
    /**
     * 服务对象
     */
    @Resource
    private ProductService productService;
    @GetMapping("pid/{pid}")
    public R<Product> selectByPid(@PathVariable("pid") Long pid){
        return productService.selectProductById(pid);

    }
}

